<?php
class BaseModelError {
	private $_error = array();
	
	public function __construct() {
	}
	public function missingDBHandle($params) {
		$this->_error[] = array('message'=>'lost db handle','name'=>'error');
		$this->_output('DBHandle');
	}
	public function missingModel($params) {
		$this->_error[] = array('message'=>'error model used','name'=>'error');
		$this->_output('Model');
	}
	public function missingAction($params) {
		$this->_error[] = array('message'=>'error action query','name'=>'error');
		$this->_output('Action');
	}
	public function missingController($params) {
		$this->_error[] = array('message'=>'error controller','name'=>'error');
		$this->_output('Controller');
	}
	public function missingTemplates($params) {
		$this->_error[] = array('message'=>'no templates like this','name'=>'error');
		$this->_output('Templates');
	}
	private function _output($tplFile, $postfix='.html') {
		$ctrl = new BaseController();
		$ctrl->setElement('error',$this->_error);
		$_fn = FOLDER_ERROR.DS.$tplFile.$postfix;
		$ctrl->output($_fn);
	}
}
?>